#!/bin/bash
set -e
ulimit -n 1000000

DEPLOY_DIR={{ deploy_dir }}
cd "${DEPLOY_DIR}" || exit 1

exec > >(tee -i -a "{{ node_exporter_log_dir }}/{{ node_exporter_log_filename }}")
exec 2>&1

exec bin/node_exporter --web.listen-address=":{{ node_exporter_port }}" \
    --log.level="{{ node_exporter_log_level }}"
